import request from "@/utils/request";

// 查询项目列表
export function listProject(query) {
  return request({
    url: "/cld/project/list",
    method: "get",
    params: query,
  });
}

// 查询项目合同列表
export function listProjectContract(query) {
  return request({
    url: "/cld/project/signList",
    method: "get",
    params: query,
  });
}

// 查询项目详细
export function getProject(projectId) {
  return request({
    url: "/cld/project/" + projectId,
    method: "get",
  });
}

// 查询项目列表
export function getList(query) {
  return request({
    url: "/cld/project/getList",
    method: "get",
    params: query,
  });
}

// 新增项目
export function addProject(data) {
  return request({
    url: "/cld/project",
    method: "post",
    data: data,
  });
}

// 修改项目
export function updateProject(data) {
  return request({
    url: "/cld/project",
    method: "put",
    data: data,
  });
}

// 删除项目
export function delProject(projectId) {
  return request({
    url: "/cld/project/" + projectId,
    method: "delete",
  });
}

// 打卡地址
export function clockIn(data) {
  return request({
    url: "/cld/project/clockIn",
    method: "put",
    data: data,
  });
}

// 终止项目
export function projectTermination(data){
  return request({
    url: "/cld/project/projectTermination",
    method: "put",
    data: data,
  });
}


// 项目续签
export function projectRenewal(projectId){
  return request({
    url: "/cld/project/projectRenewal/" + projectId,
    method: "put",
  });
}